package com.xbongbong.paas.domain.dao;

import com.xbongbong.paas.domain.entity.ClueJointRecheckEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author zhouwq
 * @date 2021/11/25 10:20
 */
@Mapper
@Repository
public interface ClueJointRecheckDao {

    /**
     * 插入实体
     * @param clueJointRecheckEntity
     * @return
     */
    Integer insert(ClueJointRecheckEntity clueJointRecheckEntity);

    /**
     * 更新设置的规则数据
     * @param clueJointRecheckEntity
     * @return
     */
    Integer update(ClueJointRecheckEntity clueJointRecheckEntity);

    /**
     * 通过formId查找数据
     * @param formId
     * @param corpid
     * @return
     */
    List<ClueJointRecheckEntity> getByFormId(@Param("formId") Long formId, @Param("corpid") String corpid);

    /**
     * 通过formId删除数据
     * @param formId
     * @param corpid
     * @return
     */
    Integer deleteByForm(@Param("formId") Long formId, @Param("corpid") String corpid);

    ClueJointRecheckEntity getByFormIdAndLinkBusinessType(@Param("formId") Long formId, @Param("linkBusinessType") Integer linkBusinessType,  @Param("corpid") String corpid);
    List<ClueJointRecheckEntity> getByFormIdListByScript(@Param("formIdIn") List<Long> formIdIn, @Param("businessTypeList") List<Integer> linkBusinessType,  @Param("corpIdIn") List<String> corpIdIn);
}
